<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<!-- 取出部署的应用程序名或者是当前的项目名称 -->
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE html>
<html lang="zh-CN" class="no-js">
<head>
    <meta charset="UTF-8">
    <title>新增书籍</title>

    <%@include file="/WEB-INF/jsp/common/component/head.jsp"%>
</head>

<body>
    <%@include file="/WEB-INF/jsp/common/component/navbar.jsp"%>

    <div id="left">
        <%@include file="/WEB-INF/jsp/common/component/userMessage.jsp"%>
        <%@include file="/WEB-INF/jsp/common/component/menu.jsp"%>
    </div><!-- /#left -->

    <div id="wrap">
        <div class="content" >
            <div class="inner">
                <form id="createForm" class="form-horizontal" role="form">
                    <div class="form-group">                                                                               <!--页头-->
                        <div class="col-sm-12 ">
                            <div class="page-header">
                                <h1 style="font-size: 50px">&nbsp;&nbsp;&nbsp;上&nbsp;传&nbsp;书&nbsp;籍</h1>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">                                                                            <!--上传书籍图片-->
                        <label for="cover" class="col-sm-4 control-label">书籍封面</label>
                        <div class="col-sm-4 ">
                            <input id="cover" name="cover" type="file">
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-danger" >*</span>
                            </label>
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-warning" ></span>
                            </label>
                        </div>
                    </div>
                    <br/>
                    <br/>
                    <div class="form-group">                                                                             <!--书名-->
                        <label for="name" class="col-sm-4 control-label">书名</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" id="name" name="name" placeholder="书籍名称">
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-danger" >*</span>
                            </label>
                        </div>
                        <!-- 用于显示验证错误的信息 -->
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-warning" ></span>
                            </label>
                        </div>
                    </div>
                    <br/>
                    <div class="form-group">
                        <label for="isbn" class="col-sm-4 control-label">ISBN</label>
                        <div class=" col-sm-4">
                            <input type="text" class="form-control" id="isbn" name="isbn" placeholder="就是书本条形码下的数字~ ">
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-danger" >*</span>
                            </label>
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-warning" ></span>
                            </label>
                        </div>
                    </div>
                    <br/>
                    <div class="form-group">
                        <label for="author" class="col-sm-4 control-label">作者</label>
                        <div class=" col-sm-4">
                            <input type="text" class="form-control" id="author" name="author" placeholder="书籍作者">
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-danger" >*</span>
                            </label>
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-warning" ></span>
                            </label>
                        </div>
                    </div>
                    <br/>
                    <div class="form-group">                                                                               <!--语言-->
                        <label for="language" class="col-sm-4 control-label">语言</label>
                        <div class="col-sm-4">
                            <select id="language" name="language" class="form-control">
                                <c:forEach items="${languageList}" var="v">
                                    <option value="${v.id}">${v.name}</option>
                                </c:forEach>
                            </select>
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-danger" >*</span>
                            </label>
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-warning" ></span>
                            </label>
                        </div>
                    </div>
                    <br/>
                    <div class="form-group">
                        <label for="publishingHouse" class="col-sm-4 control-label">出版社</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" id="publishingHouse" name="publishingHouse" placeholder="出版社"/>
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-danger" >*</span>
                            </label>
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-warning" ></span>
                            </label>
                        </div>
                    </div>
                    <br/>
                    <div class="form-group">
                        <label for="publicationYear" class="col-sm-4 control-label">出版年份</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control"  id="publicationYear" name="publicationYear" placeholder="出版年份">
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-danger" >*</span>
                            </label>
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-warning" ></span>
                            </label>
                        </div>
                    </div>
                    <br/>
                    <div class="form-group">
                        <label for="price" class="col-sm-4 control-label">价格</label>
                        <div class="col-sm-4">
                            <div class="input-group">
                                <input type="text" class="form-control" id="price" name="price" placeholder="价格"/>
                                <span class="input-group-addon">元</span>
                            </div>
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-danger" >*</span>
                            </label>
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-warning" ></span>
                            </label>
                        </div>
                    </div>
                    <br/>
                    <div class="form-group">
                        <label for="status" class="col-sm-4 control-label">是否上架</label>
                        <div class="col-sm-4">
                            <div class="switch" >
                                <input id="status" type="checkbox" name="rememberMe">
                            </div>
                        </div>
                    </div>
                    <br/>
                    <div class="form-group">
                        <label for="remark" class="col-sm-4 control-label">备注</label>
                        <div class="col-sm-5">
                            <textarea class="form-control" id="remark" name="remark" rows="5" placeholder=""></textarea>
                        </div>
                    </div>
                    <br/>

                    <div class="form-group">                                                                            <!--上传书籍图片-->
                        <label for="images" class="col-sm-4 control-label">展示图片</label>
                        <div class="col-sm-4">
                            <input id="images" name="images" multiple type="file">
                        </div>
                        <div class="col-sm-1">
                            <label>
                                <span class="label label-info" >最多 3 张</span>
                            </label>
                        </div>
                    </div>
                    <br/>
                    <br/>
                    <div class="form-group">
                        <div class="col-sm-offset-5 col-sm-3">
                            <!-- btn-block 指定按钮和父元素一样大 -->
                            <button type="submit" class="btn btn-info btn-lg">提交</button>
                            <button type="button" class="btn btn-info btn-lg col-sm-offset-3" onclick="window.history.back()">返回</button>
                        </div>
                    </div>
                </form>
                <br/>
                <br/>
            </div>
        </div><!-- /#content -->
        <%@include file="/WEB-INF/jsp/common/component/footer.jsp"%>
    </div><!-- /#wrap -->
    <%@include file="/WEB-INF/jsp/common/component/foot.jsp"%>

    <script src="${ctx}/assets/js/user/book/create.js"></script>
</body>

</html>